def dayUP(dayfactot_work,dayfactor_rest):
    dayup = 1
    for i in range(365):
       if i % 4 == 0:
           dayup = dayup*(1 - dayfactor_rest)
       else:
           dayup = dayup*(1 + dayfactot_work)
    return dayup
dayfactor_work = 0.01
dayfactor_rest = 0
while dayUP(dayfactor_work,dayfactor_rest)<37.78:
    dayfactor_work += 0.001
    dayfactor_rest += 0.0001
print("工作日的努力参数是：{:.3f} ".format(dayfactor_work))
print("休息日的努力参数是(不下降）：{:.4f} ".format(dayfactor_rest))